home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 June / PCWorld_2007-06_cd.bin / v cisle / wua / WindowsVistaUpgradeAdvisor.msi / _2E273B4721FD61938FC8C146C395840E / BktOutputReverseTransform.xsl < prev    next >
Extensible Markup Language  |  2007-02-06  |  5KB  |  135 lines

  1. <?xml version="1.0"?>
  2. <!-- ==================================================================== -->
  3. <!-- ============ Copyright (c) 2006  Microsoft Corporation ============= -->
  4. <!-- ==================================================================== -->
  5.  
  6.  
  7. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
  8. <xsl:output method="xml" indent="yes" />
  9.  
  10.  
  11. <xsl:template match="/">
  12.  
  13.  
  14. <!-- ============================================ -->
  15. <!-- ========== VARIABLE SECTION START ========== -->
  16. <!-- ============================================ -->
  17. <xsl:variable name="NEWLINE">
  18. <xsl:text> </xsl:text>
  19. </xsl:variable>
  20. <xsl:variable name="LOWERCASE" select="'abcdefghijklmnopqrstuvwxyz'" />
  21. <xsl:variable name="UPPERCASE" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
  22. <!-- ========================================== -->
  23. <!-- ========== VARIABLE SECTION END ========== -->
  24. <!-- ========================================== -->
  25.  
  26.  
  27.  
  28.  
  29. <Log>
  30. <!-- ====================================== -->
  31. <!-- ========= SoftwareList START ========= -->
  32. <!-- ====================================== -->
  33. <SoftwareList>
  34.  
  35.  
  36.     <!-- ====================================== -->
  37.     <!-- ========= Application START ========== -->
  38.     <!-- ====================================== -->
  39.     <xsl:for-each select="//SoftwareList/Application" >
  40.         <xsl:copy>
  41.             <xsl:for-each select="@*">
  42.                 <xsl:copy />
  43.             </xsl:for-each>
  44.  
  45.  
  46.             <xsl:attribute name="FilesSignature">
  47.                 <xsl:value-of select="StaticProperties/Files/@Id" />
  48.             </xsl:attribute>
  49.  
  50.  
  51.             <!-- ====================================== -->
  52.             <!-- ==== Copy all Indicator instances ==== -->
  53.             <!-- ====================================== -->
  54.             <xsl:for-each select="Indicators/*/*">
  55.                 <xsl:variable name="TYPE" select="name(.)" />
  56.                 <xsl:element name="StaticProperty">
  57.  
  58.                     <xsl:attribute name="Type">
  59.                         <xsl:value-of select="$TYPE" />
  60.                     </xsl:attribute>
  61.  
  62.                     <xsl:for-each select="@*">
  63.                         <xsl:copy />
  64.                     </xsl:for-each>
  65.  
  66.                 </xsl:element>
  67.             </xsl:for-each>
  68.             <!-- =========================================== -->
  69.             <!-- =============== Indicator END ============= -->
  70.             <!-- =========================================== -->
  71.  
  72.  
  73.             <!-- =========================================== -->
  74.             <!-- ==== Copy all StaticProperty instances ==== -->
  75.             <!-- =========================================== -->
  76.             <xsl:for-each select="StaticProperties/Files/File">
  77.                 <xsl:variable name="TYPE" select="name(.)" />
  78.                 <xsl:element name="StaticProperty">
  79.  
  80.                     <xsl:attribute name="Type">
  81.                         <xsl:value-of select="$TYPE" />
  82.                     </xsl:attribute>
  83.  
  84.                     <xsl:for-each select="@*">
  85.                         <xsl:copy />
  86.                     </xsl:for-each>
  87.  
  88.                     <!-- =========================================== -->
  89.                     <!-- ==== Copy all DynamicProperty instances === -->
  90.                     <!-- =========================================== -->
  91.                     <xsl:if test="DynamicProperties">
  92.                         <xsl:for-each select="DynamicProperties/*/*">
  93.                             <xsl:variable name="TYPE2" select="name(.)" />
  94.                             <xsl:element name="DynamicProperty">
  95.  
  96.                                 <xsl:attribute name="Type">
  97.                                     <xsl:value-of select="$TYPE2" />
  98.                                 </xsl:attribute>
  99.  
  100.                                 <xsl:for-each select="@*">
  101.                                     <xsl:copy />
  102.                                 </xsl:for-each>
  103.  
  104.                             </xsl:element>
  105.                         </xsl:for-each>
  106.                     </xsl:if>
  107.  
  108.  
  109.                 </xsl:element>
  110.             </xsl:for-each>
  111.             <!-- =========================================== -->
  112.             <!-- ============ StaticProperty END =========== -->
  113.             <!-- =========================================== -->
  114.  
  115.  
  116.         </xsl:copy>
  117.  
  118.  
  119.     </xsl:for-each>
  120.     <!-- ====================================== -->
  121.     <!-- ========== Application END =========== -->
  122.     <!-- ====================================== -->
  123.  
  124.  
  125. </SoftwareList>
  126. <!-- ====================================== -->
  127. <!-- ========= SoftwareList END =========== -->
  128. <!-- ====================================== -->
  129.  
  130.  
  131. </Log>
  132. </xsl:template>
  133. </xsl:stylesheet>
  134.  
  135.